package com.czl.module_storehouse.mvp.presenter;


import com.czl.module_base.http.HttpResponse;
import com.czl.module_base.mvp.presenter.BasePresenter;
import com.czl.module_base.mvp.view.IView;
import com.czl.module_base.observer.AbsHandleSubscriber;
import com.czl.module_storehouse.bean.ShiftBean;
import com.czl.module_storehouse.mvp.model.ShiftModel;

/**
 * @author xubin
 */
public class ShiftPresenter extends BasePresenter<ShiftModel, IView> {
    public static final String TAG_SHIFT_ADD = "shift_add";

    /**
     * 添加移位单
     *
     * @param bean
     */
    public void addShiftInfo(ShiftBean bean) {
        doSubscribe2(mModel.addShiftInfo(bean), new AbsHandleSubscriber<HttpResponse<ShiftBean>>() {
            @Override
            public void onSuccess(HttpResponse<ShiftBean> httpResponse) {
                httpResponse.setRequestTag(TAG_SHIFT_ADD);
                mView.showHttpResponse(httpResponse);
            }
        });
    }
}
